import request from '@/utils/request'
import app from '../../App'

export function modifyOrder(order) {
  if (order.orderId) {
    return request({
      url:
        app.BASE_URL +
        '/order/addOrder/' +
        order.orderId +
        '/' +
        order.productId +
        '/' +
        order.productNum +
        '/2020-10-10',
      method: 'post',
      order,
    })
  } else {
    return request({
      url:
        app.BASE_URL +
        '/order/addOrder/-/' +
        order.productId +
        '/' +
        order.productNum +
        '/2020-10-10',
      method: 'post',
      order,
    })
  }
}
